CUBE CONNECT Edition Help

Introduction to the Network program

Network is a utility program for processing highway networks. The program can process up to ten input networks simultaneously, and can generate one output network. The program can read input network files of various formats: ASCII records, standard database in dBASE style (DBF), CUBE geodatabase networks, or any CUBE Voyager, TP+, MINUTP, Tranplan, or TRIPS binary network format. The program generates a data record for each unique node and each link found in any of the input files. For a valid node record, the Network program requires a node variable, named N. For a valid link record, the Network program requires an A-node, named A, and a B-node, named B. Each A-node and B-node must exist on a node record. To open, view, and edit the network in CUBE Graphics, the node records must also have two additional variables, named X and Y, that represent the X- and Y-coordinates of each node. The program processes each of these records using logic that you can control. You can summarize and report on the processed data.

Node and link records in a given data file need not be unique. Use the COMBINE subkeyword with the LINKI and NODEI keywords under the FILEI statement to specify how to combine values of fields with redundant data records. NETWORK also features the GEOMI keyword to read link geometry sources from shapefiles and geodatabases.

Upon detecting a Tranplan network as input, the program immediately writes it in CUBE Voyager format to a temporary file, and then uses that file in place of the original file for subsequent processing. (Note: CUBE Voyager treats a FSUTMS network as a standard Tranplan network. No auxiliary files will be open. Only CUBE deals with FSUTMS networks differently.)

If you specify an output network, the program writes a file in a proprietary (CUBE Voyager or MINUTP) binary format. It is a network database that contains speed/capacity information, node records, and link records. In MINUTP networks, the node information consists solely of coordinates for each node. In a CUBE Voyager or TP+ network, there may be any number of items for nodes. Optionally, a file of link records and/or a file of node records may be written in either ASCII or DBF format. Beginning with version 5.0, output networks may be a CUBE Voyager custom network feature class, stored in an ESRI custom geodatabase. See the description for the FORMAT subkeywords under NETO keyword for the FILEO statement for information on specifying output networks to a CUBE Voyager custom feature class network in a geodatabase file.

Subsequent topics discuss:

Built-in variables

  • A- Node number of a link's A node.
  • B- Node number of a link's B node.
  • GEOMETRYSOURCE- Defines the input file index number that controls the source of the geometry to be applied to the output NETO or LINKO file when multiple input networks are specified.The Network program may take up to ten input networks. These ten networks can be any of the supported binary formats, CUBE geodatabase networks, GIS shapefiles (for GEOMI only), or combinations of link and node files in ASCII, DBF, or MDB formats. When specifying an output network to a CUBE geodatabase network or LINKOshape file, GEOMETRYSOURCEspecifies which # from the FILEI LINKI[#]= or FILEI GEOMI[#]=specifications provides the geometry to be applied to the output geodatabase network. Each input network coming from a geodatabase network will have a field called GEOMETRYSOURCE. This field's value is the index of the input file (3 for LINKI[3], for example). Other input formats could also have a field called GEOMETRYSOURCE defined by the user. The value of the GEOMETRYSOURCE field in the output network dictates the source of the link geometry. By default, the value is taken from the first available value from all the input networks. So if LINKI[1] is a binary network without a GEOMETRYSOURCE field and LINKI[2] is a geodatabase network, the output GEOMETRYSOURCE field will have a value of 2 (unless there is no record in LINKI[2] for a certain link). If MERGE RECORD=T, records that are merged from other LINKIs retain their GEOMETRYSOURCE value. Therefore, the output network could have a mix of GEOMETRYSOURCE values. In addition, you can specifically set the value in a script based on other attributes in the various input networks (for example, downtown use LINKI[3], and other areas use LINKI[2]).Please refer to GEOMI for additional usage requirements specific to that keyword and its indices.
  • N- Node number of the node.
  • X- X-coordinate value of a node.
  • Y- Y-coordinate value of a node.
  • _COMPARE- Stores a return code value resulting from the COMPARE statement.
  • _ZONES- Holds the number of zones read from the input network as set by the ZONES parameter.

Built-in functions

  • SPEEDFOR(lanes,spdclass) - Returns the speed from the SPEED table for the designated number of lanes and spdclass.
  • CAPACITYFOR(lanes,capclass) - Returns the capacity times the lanes for the designated number of lanes and spdclass.
  • CHECKNAME(Name) - Check if a link attribute exists. If it does not exist, the function returns a zero. If it exists, the return code is a 2 digit number in the format of {t}{s}, defined as follows:

    {t} is type

    0=single variable

    1=vector

    2=user function

    3=work matrices

    4=user function

    5=user function

    6=vector with constant index and no default index

    7=multidimension array, no default index

    {s} is storage size

    1=numeric size

    2=string

    e.g. 1=numeric variable, 2=string variable, 11=numeric array, 12=string array
  • GETVALUE(Name {, DefaultValue}) - Get a numeric value from a link attribute. This function is used along with the CheckName function. CheckName checks the existence of a link attribute and GetValue extracts the value from it. They are used to avoid model run crash due to non-existence or invalid value of a link attribute in the input files. Users can specify a default value in case of any invalid values. For example:
    IF(CHECKNAME('LI.1.LANES')>0)
    		  _Im=GETVALUE('LI.1.LANES') 
    ENDIF